from base import Base
from selenium.webdriver.common.by import By
from time import sleep
from appium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
class SousuoPage(Base):
    sousuokuang=('new UiSelector().text("搜索菜谱")')
    shurukuang=('new UiSelector().resourceId("com.xiachufang:id/search_edit_text")')
    sousuoanniu=(By.XPATH,'/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.RelativeLayout/android.widget.RelativeLayout[3]/android.widget.TextView')
    dy=(By.XPATH,'//android.widget.TextView[@text="家常"]')
    def sousuoyewu(self,connect):
        self.find_ele(self.sousuokuang).click()
        sleep(2)
        self.find_ele(self.shurukuang).send_keys(connect)
        sleep(2)
        self.find_ele(self.sousuoanniu).click()
        sleep(3)


